#!/bin/bash
read -p "Please input first nmb1: " NMB1
read -p "Please input operator: " OPER
read -p "Please input second nmb2: " NMB2
case $OPER in
   \+)
   NMB=$[ ${NMB1}+$NMB2 ]
   ;;
   \-)
   NMB=$[${NMB1}-$NMB2]
   ;;
   \*)
   NMB=$[${NMB1}*$NMB2]
   ;;
   \/)
   NMB=$[${NMB1}/$NMB2]
   ;;
   \%)
   NMB=$[${NMB1}%$NMB2]
   ;;
   \*\*)
   NMB=$[${NMB1}**$NMB2]
   ;;
   *)
   echo -e '\033[31mError:The operator is not exist!!(+|-|*|/|%|**)\033[0m'
esac
echo $NMB